 package com.bmps.springcloud.insuredmicroservice.model.accept.resquest;

 import org.apache.commons.lang3.builder.EqualsBuilder;
 import org.apache.commons.lang3.builder.HashCodeBuilder;

 import javax.validation.Valid;
 import javax.validation.constraints.NotEmpty;
 import javax.validation.constraints.NotNull;
 import java.io.Serializable;
 import java.util.List;

 /**
  *  @author lyw
  *  @date 2019/07/24
  */
 public class InsurantsModel implements Serializable {

     @NotNull(message="insCount字段不能为空!")
	 private Integer insCount;

     @Valid
     @NotEmpty(message="insurant节点不能为空!")
	 private List<InsurantModel> insurant;

     public Integer getInsCount() {
         return insCount;
     }

     public void setInsCount(Integer insCount) {
         this.insCount = insCount;
     }

     public List<InsurantModel> getInsurant() {
         return insurant;
     }

     public void setInsurant(List<InsurantModel> insurant) {
         this.insurant = insurant;
     }

     @Override
     public boolean equals(Object o) {
         if (this == o) {
             return true;
         }

         if (o == null || getClass() != o.getClass()) {
             return false;
         }

         InsurantsModel that = (InsurantsModel) o;

         return new EqualsBuilder()
                 .append(insCount, that.insCount)
                 .append(insurant, that.insurant)
                 .isEquals();
     }

     @Override
     public int hashCode() {
         return new HashCodeBuilder(17, 37)
                 .append(insCount)
                 .append(insurant)
                 .toHashCode();
     }

     @Override
     public String toString() {
         return "InsurantsModel{" +
                 "insCount=" + insCount +
                 ", insurant=" + insurant +
                 '}';
     }
 }
